﻿@model ExpressQuiz.ViewModels.ContactViewModel

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}


<br/>
<div class="container">
    <div class="row">
        @if (Model.WasSent)
        {
            <div class="col-md-12">
                <div class="alert alert-success"><strong>Thank you!</strong></div>
            </div>
        }

        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()

            <div class="col-lg-6">
              
                <div class="form-group">
                    @Html.LabelFor(m => m.Name)
                    @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
                </div>
                
                <div class="form-group">
                    @Html.LabelFor(m => m.Email)
                    @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control", placeholder = "Enter email" } })
                    @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
                </div>
                
                <div class="form-group">
                    @Html.LabelFor(m => m.Message)
                    @Html.EditorFor(model => model.Message, new { htmlAttributes = new { @class = "form-control", rows = "5" } })
                    @Html.ValidationMessageFor(model => model.Message, "", new { @class = "text-danger" })
                </div>

                <input type="submit" name="submit" id="submit" value="Send" class="btn btn-primary pull-right">
            </div>
        }

    </div>

</div>